﻿@model WebFitness.Aluno

@{
    ViewBag.Title = "Editar";
}

<div class="span7">
    <div class="top-bar">
        <h3>
            <i class="icon-cog"></i>
            Cadastro Alunos
        </h3>
    </div>
    <div class="well no-padding">
        @using (Html.BeginForm("Edit", "Aluno", FormMethod.Post, new { @class = "form-horizontal" }))
        {    
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)

            @Html.HiddenFor(model => model.idAluno)
            @Html.HiddenFor(model => model.dtCriacao)
            @Html.HiddenFor(model => model.login)
            
            <div class="control-group">
                @Html.LabelFor(model => model.nome, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.nome, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.nome)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.cpf, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.cpf, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.cpf)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.telefone, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.telefone, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.telefone)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.email, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.email, new { @class = "m-wrap" })
                    @Html.ValidationMessageFor(model => model.email)
                </div>
            </div>
            
            <div class="control-group">
                @Html.LabelFor(model => model.rua, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.rua, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.rua)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.bairro, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.bairro, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.bairro)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.sexo, new { @class = "control-label" })

                <div class="controls">
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.sexo, 'M')</span> Masculino</label>
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.sexo, 'F')</span> Feminino</label>
                    @Html.ValidationMessageFor(model => model.sexo
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.aniversario, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.aniversario, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.aniversario)
                </div>
            </div>
            
            <div class="control-group">
                @Html.LabelFor(model => model.idCidade, new { @class = "control-label" })
                
                <div class="controls">
                    @Html.DropDownList("idCidade", String.Empty)
                    @Html.ValidationMessageFor(model => model.idCidade)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.senha, new { @class = "control-label" })

                <div class="controls">
                    @*@Html.PasswordFor(model => model.senha, new { @class = "span3 m-wrap" })*@
                    <input type="password" name="senha" id="senha" class="span3 m-wrap" />
                    @Html.ValidationMessageFor(model => model.senha)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.status, new { @class = "control-label" })

                <div class="controls">
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.status, (byte) WebFitness.Status.Ativo)</span> @WebFitness.Status.Ativo</label>
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.status, (byte) WebFitness.Status.Inativo)</span> @WebFitness.Status.Inativo</label>
                </div>
            </div>
            
            <div class="form-actions">
                <input type="submit" class="btn btn-success" name="enviar" value="Salvar" />
                @Html.ActionLink("Cancelar", "Index", null, new { @class = "btn btn-danger" })
            </div>

        }

    </div>
</div>